#pragma once

#include <d3dx9math.h>

class Vector2 : public D3DXVECTOR2
{
public:
	Vector2( void );
	Vector2( float fx, float fy );
	Vector2( const D3DXVECTOR2 & vector );

	~Vector2( void );

public:
	void Set( float fx, float fy );

	void Normalize()	{ D3DXVec2Normalize(this, this); }

	float GetLength() { return D3DXVec2Length( this ); }
	float GetLengthSquared() { return D3DXVec2LengthSq( this ); }

	float GetDotProduct( const Vector2 & other ) { return D3DXVec2Dot( this, &other ); }

	bool operator == ( const D3DXVECTOR2 & other )
	{
		return ( *((D3DXVECTOR2*)this) == other ) ? true : false;
	}
};
